<template>
  <div class="login-container">
    <div class="login-box">
      <!-- 登录图片 -->
      <div class="login-pic">
        <img src="../assets/images/logo.png" alt="">
      </div>
      <!-- 登录图片结束 -->
      <!-- 登录表单 -->
      <el-form ref="form" :rules="loginFormRules" :model="loginForm">
        <el-form-item  prop="username">
          <el-input prefix-icon="iconfont icon-user" v-model="loginForm.username" placeholder="请输入用户名"></el-input>
        </el-form-item>
        <el-form-item prop="password">
          <el-input placeholder="请输入密码" v-model="loginForm.password" :type="ispwd ? 'password' : 'text'">
            <i slot="prefix" :class="['iconfont', ispwd ? 'icon-3702mima' : 'icon-showpassword']" @click="ispwd = !ispwd"></i>
          </el-input>
        </el-form-item>
      <!-- 按钮开始 -->
        <el-col>
          <el-button type="primary" size="mini" @click="login">登录</el-button>
          <el-button type="danger" size="mini" @click="reset">重置</el-button>
        </el-col>
      <!-- 按钮结束 -->
      </el-form>
      <!-- 登录表单结束 -->

    </div>
  </div>
</template>
<script>
import mix from '../mixins/login-mixin.js'
export default {
  mixins: [mix]
}
</script>
<style lang="less" scoped>
.login-container {
  height: 100%;
  background-color: #2b4b6b;
  .login-box {
    width: 450px;
    height: 304px;
    background-color: #fff;
    position: relative;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    .login-pic {
      width: 120px;
      height: 120px;
      padding: 10px;
      border: 1px solid #eee;
      box-shadow: 0 1px 6px #eee;
      border-radius: 50%;
      position: relative;
      left: 50%;
      transform: translateX(-50%);
      top: -60px;
      background-color: #fff;
      img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background-color: #eee;
      }
    }
  }
  .el-form {
    padding: 25px;
    position: relative;
    top: -40px;
    .el-col {
      display: flex;
      justify-content: flex-end;
    }
  }
}
</style>
